/**
 * @file   test001.c
 * @author Scott Craig and Justin Tanner
 * @date   Mon Oct 29 16:19:32 2007
 *
 * @brief  Test 001 - sanity test, can we print to UART
 *
 */
#include "header/common.h"
#include "header/os.h"
#include "header/uart.h"
#include "header/trace.h"

enum { A=1, B};
const unsigned char PPP[] = {A,1,B,1};
const unsigned int PT = 2;
EVENT* print_event;
extern uint16_t trace_counter;

void generic_task(void)
{
	int arg = 0;
	arg = Task_GetArg();

    for(;;)
    {
        add_to_trace(arg);
    	Task_Next();
    }
}

int main(void) {
	UART_BPS bitrate = UART_38400;
	uart_init(bitrate);

    print_event = Event_Init();

    Task_Create(generic_task, A, PERIODIC, A);
    Task_Create(generic_task, B, PERIODIC, B);

    Event_Wait(print_event);
    print_trace();
    return 0;
}
